﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RepositoryFramework.Services;
using Portal.Model;
using Portal.Repository;

namespace Portal.Logic.Services
{
	/// <summary>
	/// Interface <see cref="IUserService"/> declare user service
	/// </summary>
	public interface IUserService : IServiceBase<IUser>
	{
		/// <summary>
		/// Add or update user
		/// </summary>
		/// <param name="user"></param>
		/// <returns>User</returns>
		IUser AddOrUpdate(IUser user);

		/// <summary>
		/// Add or update user
		/// </summary>
		/// <param name="user">The user</param>
		/// <param name="repository">The repository</param>
		/// <returns>User</returns>
		IUser AddOrUpdate(IUserRepository repository, IUser user);

		/// <summary>
		/// Get user by Windows logon
		/// </summary>
		/// <param name="logon"></param>
		/// <returns>User</returns>
		IUser GetBy(string logon);
	}
}
